<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<form th:action="@{/findPage}" method="post">
    姓名：<input type="text" name="ename" th:value="${ename}">
    部门：<input type="text" name="dname" th:value="${dname}">
    <input type="submit" value="查询"><br><br>

    <a th:href="@{/toAdd}">添加</a>

    <table border="1" cellspacing="0">
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>工资</td>
            <td>时间</td>
            <td>部门</td>
            <td>操作</td>
        </tr>
        <tr th:each="emp:${list.getRecords()}" th:if="${emp.del==1}">
            <td th:text="${emp.eid}"></td>
            <td th:text="${emp.ename}"></td>
            <td th:text="${emp.sex}"></td>
            <td th:text="${emp.salary}"></td>
            <td th:text="${emp.createtime}"></td>
            <td th:text="${emp.dname}"></td>
            <td>
                <a th:href="@{/findByEid(eid=${emp.eid})}">修改</a>
                <a th:href="@{/del(eid=${emp.eid})}">删除</a>
            </td>
        </tr>
    </table>

    <button><a href="/findPage?current=1">首页</a></button>

    <button><a th:href="@{/findPage(current=${list.current-1})}">上页</a></button>
    <button><a th:href="@{/findPage(current=${list.current+1})}">下页</a></button>
    <button><a th:href="@{/findPage(current=${list.pages})}">尾页</a></button>

    第<span th:text="${list.getCurrent()}"></span>页/共<span th:text="${list.getPages()}"></span>页

    共<span th:text="${list.getTotal()}"></span>条数据

</form>

</body>
</html>